<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich" template="embed/template.xhtml">

	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<ui:define name="topnav">
		<ui:include src="/embed/menu.xhtml">
			<ui:param name="page" value="home" />
		</ui:include>
	</ui:define>
	<ui:define name="sidebar">
		<ui:include src="/login/login.xhtml" />
	</ui:define>

	<ui:define name="search">

		<ui:include src="/embed/search.xhtml" />

	</ui:define>

	<ui:define name="body">		
		<div class="productbox" >			
		<rich:panel>
			<f:facet name="header">请输入新的配送地址</f:facet>
			<h:form>
				<h:dataTable value="#{newAddress}" var="item">
					<h:column>
						<s:validateAll>
							<div class="formRow"><h:outputLabel for="username">收货人姓名<em>*</em>
							</h:outputLabel> <h:inputText id="username" value="#{item.signName}"
								required="true" /> <h:outputText>由字母，数字，下滑线组成，须以字母开头，6-10位</h:outputText>
							<div class="validationError"><h:message for="username" /></div>
							</div>

							<div class="formRow"><h:outputLabel for="province">省份/直辖市<em>*</em>
							</h:outputLabel> <h:inputText id="province" value="#{item.province}"
								required="true" /></div>


							<div class="formRow"><h:outputLabel for="address">详细地址<em>*</em>
							</h:outputLabel> <h:inputText id="address" value="#{item.detailAddress}"
								required="true" styleClass="wide" /> <h:outputText>300个城市送货上门</h:outputText>
							<div class="validationError"><h:message for="address" /></div>
							</div>

							<div class="formRow"><h:outputLabel for="zipcode">邮政编码<em>*</em>
							</h:outputLabel> <h:inputText id="zipcode" value="#{item.zipcode}"
								required="true" styleClass="wide" /> <h:outputText>六位邮政编码</h:outputText>
							<div class="validationError"><h:message for="zipcode" /></div>
							</div>

							<div class="formRow"><h:outputLabel for="telephone">手机号码<em>*</em>
							</h:outputLabel> <h:inputText id="telephone" value="#{item.telephone}"
								required="true" styleClass="wide" /> <h:outputText>请输入手机号</h:outputText>
							<div class="validationError"><h:message for="telephone" /></div>
							</div>

						</s:validateAll>


						<h5>送货方式选择</h5>
						<h:selectOneRadio value="#{item.sentStyle}" layout="pageDirection"
							required="true">


							<f:selectItem itemLabel="平邮" itemValue="平邮" />

							<f:selectItem itemLabel="快递" itemValue="快递" />

							<f:selectItem itemLabel="EMS" itemValue="EMS" />

						</h:selectOneRadio>

						<h5>送货时间选择</h5>

						<h:selectOneRadio value="#{item.sentTime}" layout="pageDirection">


							<f:selectItem itemLabel="工作日、双休日与假日均可送货"
								itemValue="工作日、双休日与假日均可送货" />

							<f:selectItem itemLabel="只双休日、假日送货（工作日不送货）"
								itemValue="只双休日、假日送货（工作日不送货）" />

							<f:selectItem itemLabel="只工作日送货（双休日、假日不送货）"
								itemValue="只工作日送货（双休日、假日不送货）" />

							<f:selectItem
								itemLabel="学校地址/地址白天没人，请尽量安排其他时间送货（注：特别安排可能超出预计送货天数）"
								itemValue="学校地址/地址白天没人，请尽量安排其他时间送货（注：特别安排可能超出预计送货天数）" />
						</h:selectOneRadio>

						<h:commandButton action="#{AddressInfo.updateAddress}"
							value="保存地址信息" />
					    
						 <s:link view="/myaccount.xhtml" value="返回" propagation="none"/>
					</h:column>					
				</h:dataTable>
				<br/>
			</h:form>
		</rich:panel>
       </div>
       
	</ui:define>
</ui:composition>





